package com.sinocare.report.controller;

import com.sinocare.common.entity.vo.Consumer;
import com.sinocare.common.entity.vo.Monthly;
import com.sinocare.common.result.Result;
import com.sinocare.common.result.ResultCode;
import com.sinocare.report.service.ConsumerService;
import com.sinocare.report.service.MonthlyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/Monthly")
@Api(tags = "报表管理接口")
public class MonthlyController {
    @Resource
    private MonthlyService monthlyService;

    //检测记录报表：查询所有
    @ApiOperation(value = "月度数据报表：查询所有", notes = "月度数据报表：查询所有", httpMethod = "GET")
    @RequestMapping(value = "monthly", method = RequestMethod.GET)
    public Result findTestRecordReport() throws Exception {

        List<Monthly> list=monthlyService.query(null);
        System.out.println(list);
        return Result.ok(ResultCode.SUCCESS, list);
    }
}
